/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interfaz;

import Fuente.*;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;

/**
 *
 * @author Julio Lemus
 */
public class Interfaz extends javax.swing.JFrame {
    public Juego jg_atacante, jg_eq;
    public SocketServidor socketserver;
    public SocketCliente socketcliente;
    panelBalanza pnlBal;
    int turno, resultado;
    
    
    /**
     * Creates new form Interfaz
     */
    public Interfaz() {
        initComponents();
        lblNumero.setEnabled(false);
        lblGanador_Titulo.setVisible(false);
//        this.setSize(587, 470);
        pnlBal = new panelBalanza(pnlBalanza.getSize());
        pnlBalanza.add(pnlBal);
        pnlBalanza.repaint();
        this.setLocationRelativeTo(null);
        itemchIndividual.setSelected(true);
        repaint();
        lblTurno.setText("");
        lblGrados.setText("");
        lblIndicacion.setText("");
        turno = 0;
        resultado = 0;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        dgCliente = new javax.swing.JDialog();
        jPanel9 = new javax.swing.JPanel();
        lblNombre = new javax.swing.JLabel();
        lblDireccionIP = new javax.swing.JLabel();
        lblPuerto = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtDireccionIP = new javax.swing.JTextField();
        txtPuerto = new javax.swing.JTextField();
        jPanel10 = new javax.swing.JPanel();
        btnGuardar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        btnSalir = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        lblTitulo = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        lblTituloResultados = new javax.swing.JLabel();
        lblJugadorGanador = new javax.swing.JLabel();
        lblGanador_Titulo = new javax.swing.JLabel();
        pnlJugador = new javax.swing.JPanel();
        lblTituloJugador = new javax.swing.JLabel();
        lblNumero = new javax.swing.JLabel();
        lblNombreJugador = new javax.swing.JLabel();
        lblTurno = new javax.swing.JLabel();
        tbpnlPrincipal = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        lblGrados = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        pnlBalanza = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        lblJug1 = new javax.swing.JLabel();
        lblJug2 = new javax.swing.JLabel();
        lblModo = new javax.swing.JLabel();
        lblIndicacion = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jMenuBar1 = new javax.swing.JMenuBar();
        menArchivo = new javax.swing.JMenu();
        itemNuevo = new javax.swing.JMenuItem();
        itemSalir = new javax.swing.JMenuItem();
        menModoConexion = new javax.swing.JMenu();
        itemchServidor = new javax.swing.JCheckBoxMenuItem();
        itemchCliente = new javax.swing.JCheckBoxMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        itemchIndividual = new javax.swing.JCheckBoxMenuItem();

        dgCliente.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        dgCliente.setTitle("Datos");
        dgCliente.setAlwaysOnTop(true);
        dgCliente.setResizable(false);

        lblNombre.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNombre.setText("Nombre:");

        lblDireccionIP.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblDireccionIP.setText("Dirección IP:");

        lblPuerto.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblPuerto.setText("Puerto");

        txtNombre.setColumns(15);
        txtNombre.setEditable(false);
        txtNombre.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtNombre.setText("Cliente: Equilibrista");

        txtDireccionIP.setColumns(12);
        txtDireccionIP.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtDireccionIP.setText("localhost");
        txtDireccionIP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDireccionIPActionPerformed(evt);
            }
        });

        txtPuerto.setColumns(5);
        txtPuerto.setEditable(false);
        txtPuerto.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        txtPuerto.setText("1234");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblPuerto)
                    .addComponent(lblDireccionIP)
                    .addComponent(lblNombre))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtDireccionIP, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(30, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblNombre)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDireccionIP)
                    .addComponent(txtDireccionIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblPuerto)
                    .addComponent(txtPuerto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/guardar.jpg"))); // NOI18N
        btnGuardar.setToolTipText("GUARDAR");
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardaraccionGuardar(evt);
            }
        });

        btnLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/nuevo.jpg"))); // NOI18N
        btnLimpiar.setToolTipText("LIMPIAR");
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiaraccionLimpiarDialogo(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(130, 130, 130)
                .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(127, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnGuardar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnLimpiar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(11, 11, 11))
        );

        javax.swing.GroupLayout dgClienteLayout = new javax.swing.GroupLayout(dgCliente.getContentPane());
        dgCliente.getContentPane().setLayout(dgClienteLayout);
        dgClienteLayout.setHorizontalGroup(
            dgClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dgClienteLayout.createSequentialGroup()
                .addGap(5, 5, 5)
                .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        dgClienteLayout.setVerticalGroup(
            dgClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dgClienteLayout.createSequentialGroup()
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Equilibrista vs Atacante");
        setResizable(false);

        btnSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/exit.jpg"))); // NOI18N
        btnSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionSalir(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnSalir, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(32, 32, 32))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(btnSalir)
        );

        lblTitulo.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        lblTitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblTitulo.setText("Atacante vs Equilibrista");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGap(203, 203, 203)
                .addComponent(lblTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(186, 186, 186))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTitulo)
                .addContainerGap(18, Short.MAX_VALUE))
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblTituloResultados.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblTituloResultados.setText("RESULTADO");

        lblJugadorGanador.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblJugadorGanador.setForeground(new java.awt.Color(0, 51, 153));
        lblJugadorGanador.setText("                             ");

        lblGanador_Titulo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblGanador_Titulo.setForeground(new java.awt.Color(0, 51, 153));
        lblGanador_Titulo.setText("Ganador:");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblTituloResultados))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(lblJugadorGanador))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblGanador_Titulo)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(lblTituloResultados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblGanador_Titulo)
                .addGap(17, 17, 17)
                .addComponent(lblJugadorGanador)
                .addContainerGap(61, Short.MAX_VALUE))
        );

        pnlJugador.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        pnlJugador.setEnabled(false);

        lblTituloJugador.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblTituloJugador.setText("JUGADOR");

        lblNumero.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/question.jpg"))); // NOI18N
        lblNumero.setToolTipText("PRESIONE PARA OBTENER UN NÚMERO ALEATORIO");
        lblNumero.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                accionAsignarPeso(evt);
            }
        });

        lblNombreJugador.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lblNombreJugador.setForeground(new java.awt.Color(0, 0, 204));

        lblTurno.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        lblTurno.setText("Turno: 1");

        javax.swing.GroupLayout pnlJugadorLayout = new javax.swing.GroupLayout(pnlJugador);
        pnlJugador.setLayout(pnlJugadorLayout);
        pnlJugadorLayout.setHorizontalGroup(
            pnlJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlJugadorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(lblTituloJugador)
                        .addComponent(lblNombreJugador, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(lblNumero))
                    .addComponent(lblTurno))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlJugadorLayout.setVerticalGroup(
            pnlJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlJugadorLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTituloJugador)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(lblNombreJugador)
                .addGap(9, 9, 9)
                .addComponent(lblNumero)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lblTurno)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlJugador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(pnlJugador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        lblGrados.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        lblGrados.setForeground(new java.awt.Color(51, 0, 0));
        lblGrados.setText("11");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel3.setText("+");

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel4.setText("-");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(31, 31, 31)
                .addComponent(lblGrados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addComponent(jLabel4)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel3)
                .addComponent(lblGrados)
                .addComponent(jLabel4))
        );

        javax.swing.GroupLayout pnlBalanzaLayout = new javax.swing.GroupLayout(pnlBalanza);
        pnlBalanza.setLayout(pnlBalanzaLayout);
        pnlBalanzaLayout.setHorizontalGroup(
            pnlBalanzaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 411, Short.MAX_VALUE)
        );
        pnlBalanzaLayout.setVerticalGroup(
            pnlBalanzaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 84, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblJug1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lblJug2)
                .addGap(69, 69, 69))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(31, Short.MAX_VALUE)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblJug2)
                    .addComponent(lblJug1))
                .addGap(38, 38, 38))
        );

        lblModo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        lblModo.setForeground(new java.awt.Color(0, 0, 204));
        lblModo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblModo.setText("Individual");

        lblIndicacion.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        lblIndicacion.setForeground(new java.awt.Color(51, 0, 0));
        lblIndicacion.setText("Su turno");

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel1.setText("A");

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel2.setText("E");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(lblModo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(lblIndicacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(74, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(pnlBalanza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(71, 71, 71))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel1)
                        .addGap(109, 109, 109)
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel2)
                        .addGap(83, 83, 83))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(lblModo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlBalanza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)
                .addComponent(lblIndicacion))
        );

        tbpnlPrincipal.addTab("Tablero", jPanel1);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 556, Short.MAX_VALUE)
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 296, Short.MAX_VALUE)
        );

        tbpnlPrincipal.addTab("Árbol", jPanel11);

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 546, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 285, Short.MAX_VALUE)
                .addContainerGap())
        );

        tbpnlPrincipal.addTab("Poda Alfa-Beta", jPanel12);

        menArchivo.setText("Archivo");

        itemNuevo.setText("Nuevo");
        itemNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionNuevo(evt);
            }
        });
        menArchivo.add(itemNuevo);

        itemSalir.setText("Salir");
        itemSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionSalir(evt);
            }
        });
        menArchivo.add(itemSalir);

        jMenuBar1.add(menArchivo);

        menModoConexion.setText("Modo");

        itemchServidor.setText("Servidor: Atacante");
        itemchServidor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionActivarServidor(evt);
            }
        });
        menModoConexion.add(itemchServidor);

        itemchCliente.setText("Cliente: Equilibrista");
        itemchCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionActivarCliente(evt);
            }
        });
        menModoConexion.add(itemchCliente);
        menModoConexion.add(jSeparator1);

        itemchIndividual.setSelected(true);
        itemchIndividual.setText("Individual");
        itemchIndividual.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accionActivarIndividual(evt);
            }
        });
        menModoConexion.add(itemchIndividual);

        jMenuBar1.add(menModoConexion);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tbpnlPrincipal))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(tbpnlPrincipal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void accionSalir(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_accionSalir
        try{    
            try{
                if (socketcliente!=null){
                    socketcliente.setJugar(false);
                    socketcliente.escuchar(false);
                }
            }catch(Exception e){
                System.err.println("Error: " + e.getMessage());
            }
            try{
                if (socketserver!=null){
                    socketserver.setJugar(false);
                    socketserver.escuchar(false);
                }
            }catch(Exception e){
                System.err.println("Error: " + e.getMessage());
            }
            System.exit(0);
        }catch(Exception e){
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_accionSalir

    private void accionNuevo(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_accionNuevo
        try{
            turno = 0;
            resultado = 0;
            lblNumero.setIcon(new ImageIcon(getClass().getResource("/Imagenes/question.jpg")));
            lblJug1.setIcon(null);
            lblJug2.setIcon(null);
            lblGrados.setText("");
            lblIndicacion.setText("");
            lblTurno.setText("Turno: 1");
            lblJugadorGanador.setText("                             ");
            lblGanador_Titulo.setVisible(false);
            lblNombreJugador.setText("Atacante");
            pnlJugador.setEnabled(true);
            lblNumero.setEnabled(true);
            if (itemchIndividual.isSelected()){
                jg_atacante = new Juego(lblNumero,lblJug1,lblJug2,lblJugadorGanador,
                        lblGrados,lblNombreJugador,lblGanador_Titulo, 1, 0);
                
                jg_eq = new Juego(lblNumero,lblJug1,lblJug2,lblJugadorGanador,lblGrados,
                        lblNombreJugador, lblGanador_Titulo, 1, 1);
            }else if (itemchCliente.isSelected()){
                JOptionPane.showMessageDialog(this, "El servidor debe iniciar la partida");
            }else if (itemchServidor.isSelected()){
                if (socketserver != null){
                    lblNumero.setEnabled(true);
                    socketserver.setTurno(true);
                    socketserver.enviarDatos("1");
                    lblIndicacion.setText("Su turno");
                }
            }
        }catch(Exception e){
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_accionNuevo

    private void accionAsignarPeso(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_accionAsignarPeso
        String Texto = null;
        try{
            System.out.println("Clicked");
            if (lblNumero.isEnabled()){
                if (itemchIndividual.isSelected()){
                    if (turno == 0){
                        jg_atacante.AsignarFicha();
                        CalcularGrado();
                        pnlBal.setRotate(Double.valueOf(String.valueOf(resultado)));
                        pnlBal.repaint();
                        jg_atacante.setTurno(jg_atacante.getTurno() + 1);
                        if (jg_atacante.getEstado()==2){
                            pnlJugador.setEnabled(false);
                            lblNumero.setEnabled(false);
                            Texto= Texto +jTextArea1.getText() + jg_atacante.setMinMaxProfundidad();
                            jTextArea1.setText(Texto);
                        }
                        turno = 1;
                    }else{
                        jg_eq.AsignarFicha();
                        CalcularGrado();
                        pnlBal.setRotate(Double.valueOf(String.valueOf(resultado)));
                        pnlBal.repaint();
                        jg_eq.setTurno(jg_eq.getTurno() + 1);
                        lblTurno.setText("Turno: " + jg_eq.getTurno());
                        if (jg_eq.getEstado()==2){
                            pnlJugador.setEnabled(false);
                            lblNumero.setEnabled(false);
                            Texto= Texto +jTextArea1.getText() + jg_atacante.setMinMaxProfundidad();
                            jTextArea1.setText(Texto);
                        }
                        turno = 0;
                    }
                }else if (itemchCliente.isSelected()){
                    if (socketcliente != null){
                        socketcliente.enviarDatos("2");
                        socketcliente.CambiarEstado_Turno();
                    }
                }else if (itemchServidor.isSelected()){
                    if (socketserver != null){
                        socketserver.enviarDatos("2");
                        socketserver.CambiarEstado_Turno();
                    }
                }
            }
            
        }catch(Exception e){
            System.err.println("Error " + e.getMessage());
        }
    }//GEN-LAST:event_accionAsignarPeso

    private void accionActivarServidor(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_accionActivarServidor
        try{
            if (itemchServidor.isSelected()){
                lblModo.setText("Servidor: Atacante");
                lblIndicacion.setText("Esperando una conexión");
                itemchCliente.setSelected(false);
                itemchIndividual.setSelected(false);
                if (socketcliente != null)
                    socketcliente.escuchar(false);
                socketserver = new SocketServidor(lblNumero,lblJug1,lblJug2,
                        lblJugadorGanador,lblGrados,lblNombreJugador,lblIndicacion);
                socketserver.escuchar(true);
                socketserver.start();
            }
            itemchServidor.setSelected(true);
        }catch(Exception e){
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_accionActivarServidor

    private void accionActivarCliente(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_accionActivarCliente
        try{
            if (itemchCliente.isSelected()){
                lblModo.setText("Cliente: Equilibrista");
                lblIndicacion.setText("Esperando una conexión");
                itemchServidor.setSelected(false);
                itemchIndividual.setSelected(false);
                if (socketserver!=null)
                    socketserver.escuchar(false);
                dgCliente.pack();
                dgCliente.setVisible(true);
                setVisible(false);
                txtDireccionIP.requestFocus();
                dgCliente.setLocationRelativeTo(null);
            }
            itemchCliente.setSelected(true);
        }catch(Exception e){
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_accionActivarCliente

    private void accionActivarIndividual(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_accionActivarIndividual
        try{
            if (itemchIndividual.isSelected()){
                lblModo.setText("Individual");
                itemchServidor.setSelected(false);
                itemchCliente.setSelected(false);
                if (socketcliente!=null)
                    socketcliente.escuchar(false);
                if (socketserver!=null)
                    socketserver.escuchar(false);
            }
            itemchIndividual.setSelected(true);
        }catch(Exception e){
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_accionActivarIndividual

    private void btnGuardaraccionGuardar(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardaraccionGuardar
        try {
            if (!txtDireccionIP.getText().isEmpty()) {
//                pnlCompetidor.setVisible(true);
//                btnPlay.setEnabled(false);
                //Activar Cliente
                socketcliente = new SocketCliente(lblNumero,lblJug1,lblJug2,
                        lblJugadorGanador,lblGrados,lblNombreJugador,lblIndicacion,
                        txtDireccionIP, txtPuerto);
                socketcliente.escuchar(true);
                socketcliente.start();
                dgCliente.setVisible(false);
                setVisible(true);
            } else {
                dgCliente.setAlwaysOnTop(false);
                JOptionPane.showMessageDialog(this, "Debe colocar una dirección IP \nPor ejemplo: localhost");
                dgCliente.setAlwaysOnTop(true);
            }
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }//GEN-LAST:event_btnGuardaraccionGuardar

    private void btnLimpiaraccionLimpiarDialogo(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiaraccionLimpiarDialogo
        txtDireccionIP.setText("");
        txtDireccionIP.requestFocus();
    }//GEN-LAST:event_btnLimpiaraccionLimpiarDialogo

    private void txtDireccionIPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDireccionIPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDireccionIPActionPerformed

    private void CalcularGrado(){
        try{
            if (jg_eq.getEstado()==1 && jg_atacante.getEstado()==1){
                if (jg_atacante.getTurno()==1 && resultado==0){
                    resultado += jg_atacante.getPeso();
                }
                else if (turno == 0){
                    resultado += jg_atacante.getPeso();
                    if (resultado >= 19){
                        jg_eq.setEstado(2);
                        lblGanador_Titulo.setVisible(true);
                        lblJugadorGanador.setText("Atacante");
                        pnlJugador.setEnabled(false);
                        lblNumero.setEnabled(false);
                    }
                }else if (turno == 1){
                    resultado -= jg_eq.getPeso();
                    if (resultado <= -19){
                        jg_eq.setEstado(2);
                        lblGanador_Titulo.setVisible(true);
                        lblJugadorGanador.setText("Equilibrista");
                        pnlJugador.setEnabled(false);
                        lblNumero.setEnabled(false);
                    }
                }
                lblGrados.setText("" + resultado + "º");
            }
        }catch(Exception e){
            System.err.println("Error: "+ e.getMessage());
        }
        //Texto= Texto +jTextArea1.getText() + jg_atacante.setMinMaxProfundidad();
                            jTextArea1.setText(jTextArea1.getText() + jg_atacante.setMinMaxProfundidad());
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Interfaz.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Interfaz().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnSalir;
    private javax.swing.JDialog dgCliente;
    private javax.swing.JMenuItem itemNuevo;
    private javax.swing.JMenuItem itemSalir;
    private javax.swing.JCheckBoxMenuItem itemchCliente;
    private javax.swing.JCheckBoxMenuItem itemchIndividual;
    private javax.swing.JCheckBoxMenuItem itemchServidor;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JLabel lblDireccionIP;
    private javax.swing.JLabel lblGanador_Titulo;
    private javax.swing.JLabel lblGrados;
    private javax.swing.JLabel lblIndicacion;
    private javax.swing.JLabel lblJug1;
    private javax.swing.JLabel lblJug2;
    private javax.swing.JLabel lblJugadorGanador;
    private javax.swing.JLabel lblModo;
    private javax.swing.JLabel lblNombre;
    private javax.swing.JLabel lblNombreJugador;
    private javax.swing.JLabel lblNumero;
    private javax.swing.JLabel lblPuerto;
    private javax.swing.JLabel lblTitulo;
    private javax.swing.JLabel lblTituloJugador;
    private javax.swing.JLabel lblTituloResultados;
    private javax.swing.JLabel lblTurno;
    private javax.swing.JMenu menArchivo;
    private javax.swing.JMenu menModoConexion;
    private javax.swing.JPanel pnlBalanza;
    private javax.swing.JPanel pnlJugador;
    private javax.swing.JTabbedPane tbpnlPrincipal;
    public static javax.swing.JTextField txtDireccionIP;
    private javax.swing.JTextField txtNombre;
    public static javax.swing.JTextField txtPuerto;
    // End of variables declaration//GEN-END:variables
}
